package com.zhongkai.model3;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

@Entity
@Table(name = "warehouse3",    catalog = "")
public class Warehouse3 implements Serializable {
    private Long id;
    private String warUuid;
    private String warName;
    private Integer warCount;
    @Basic
    @Column(name = "war_uuid")
    public String getWarUuid() {
        return warUuid;
    }

    public void setWarUuid(String warUuid) {
        this.warUuid = warUuid;
    }

    @Id
    @GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
    @Column(name = "id")
    public Long getid() {
        return id;
    }

    public void setid(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "war_name")
    public String getWarName() {
        return warName;
    }

    public void setWarName(String warName) {
        this.warName = warName;
    }

    @Basic
    @Column(name = "war_count")
    public Integer getWarCount() {
        return warCount;
    }

    public void setWarCount(Integer warCount) {
        this.warCount = warCount;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Warehouse3 warehouse = (Warehouse3) o;
        return Objects.equals(id, warehouse.id) &&
                Objects.equals(warName, warehouse.warName) &&
                Objects.equals(warCount, warehouse.warCount);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, warName, warCount);
    }
}
